package com.dubbo.consumer.AccountController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dubbo.CarBalance.AccountAccessoriesService;
import com.dubbo.common.dtos.ResponseResult;
import com.dubbo.model.balance.dtos.AccountAccessoriesDto;
import com.dubbo.model.balance.dtos.AccountDetailDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("accessories")
public class AccountAccessoriesController {

    @Reference(check = false)
    private AccountAccessoriesService service;

    @GetMapping("all")
    public ResponseResult all(@RequestBody AccountAccessoriesDto dto){
        return service.all(dto);
    }

    @GetMapping("detail/{id}")
    public ResponseResult<AccountDetailDto> detail(@PathVariable("id") String id){
        return service.detail(id);
    }
}
